<?php


namespace Modules\Chinadmin\Models;



/**
 * 账号模型
 */
class RoleModel extends BaseModel
{

    public $table = 'ca_role';
    public $primaryKey = 'id';


    static public function get_kv($type = 0){

        //只取技师
        $re = self::get()->toArray();
        $data = array_column($re,"name","id");
        if($type){
            return $data;
        }else{
            return json_encode($data);
        }

    }

}
